package com.gistmap.cloudserviceclient1;

import com.gistmap.cloudserviceclient1.config.IpConfiguration;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangran
 * @date 2018/6/5
 */
@RestController
@Slf4j
public class HelloController {
    @Autowired
    private IpConfiguration ipConfiguration;

    @GetMapping("/hello")
    public String hello(){
        log.info("service client1 {} called ",ipConfiguration.getPort());
        return "this is hello from client1 " + ipConfiguration.getPort();
    }
}
